﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BUS;

namespace TuyenDungViecLam.VN
{
    public partial class FAQ : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Drlchuyenmuc.DataSource = FAQ_BUS.LayTatCaChuyenMuc();
                Drlchuyenmuc.DataTextField = "TenChuyenMuc";
                Drlchuyenmuc.DataValueField = "MaChuyenMuc";
                Drlchuyenmuc.DataBind();
                LienKetDuLieu();
            }
        }

        private void LienKetDuLieu()
        {
            DLThongTinCauHoi.DataSource = FAQ_BUS.LayThongTinCauHoiTheoMaChuyenMuc(int.Parse(Drlchuyenmuc.SelectedValue.ToString()));
            DLThongTinCauHoi.DataBind();
        }

        

        protected void Drlchuyenmuc_SelectedIndexChanged(object sender, EventArgs e)
        {
            LienKetDuLieu();
        }

       
    }
}
